MyUnflattenFunction
To retrieve a job object when a document is opened, you can call theGXUnflattenJob
function and provide a pointer to the application-supplied unflattening function you want to use. The application-supplied function must match the following declaration. For example, this is how you should declare the function if you were to name itMyUnflattenFunction
:
OSErr MyUnflattenFunction (long size, void *data, void *refCon);
size
- The size of the segment (in bytes) to read.
data
- A pointer to job object data to unflatten.
refCon
- A pointer to a reference constant for application-specific information.
- function result
- An error code of type
OSErr
.DESCRIPTION
When you use theGXUnflattenJob
function, QuickDraw GX calls your unflattening function multiple times as the unflattening function retrieves the job object data from disk. It continues to call your function until the entire job object is retrieved. You can use therefCon
parameter to hold the file reference number of the file containing the data to unflatten. You can return anyOSErr
value.SEE ALSO
Listing 2-11 on page 2-32 shows how to use an unflattening function.The
GXUnflattenJob
function is described on page 2-59.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help